<template>
	<v-card style="margin-top: 1.5vh; background: #000000">

		<v-row>
			<v-col style="width: 60%; margin-top: 2vh; margin-left: 3%; height: 85vh;">
				<div id="map" style="width: 100%;height: 80vh;">

				</div>
			</v-col>
			<v-col>
				<v-card
						outlined
						style="margin-top: 2vh;margin-left: 5%"
						width="85%"
						height="150vh"

				>
					<v-card height="60vh" max-height="60vh" style="overflow: auto">
						<v-card-title>
							风险铁路列表
						</v-card-title>
						<v-data-table
								dense
								:headers="HeadersTrain"
								:items="train"
								item-key="id"
								class="Train"
								style="max-height: 60vh;"
								no-data-text="暂无风险铁路数据"
						></v-data-table>
					</v-card>
					<v-divider class="mx-4" style="margin-top: 8vh"></v-divider>
					<v-card height="60vh" max-height="60vh" style="margin-top: 5vh;overflow: auto">
						<v-card-title>
							风险航班列表
						</v-card-title>
						<v-data-table
								dense
								:headers="HeadersAirline"
								:items="airline"
								item-key="id"
								class="Airline"
								style="max-height: 60vh;"
								no-data-text="暂无风险航班数据"
						></v-data-table>
					</v-card>
				</v-card>
			</v-col>
		</v-row>


	</v-card>

</template>

<script>
export default {

	name: "RiskTrip",
	data: () => ({
		HeadersTrain: [
			{
				text: '班次号',
				align: 'start',
				sortable: true,
				value: 'id',
			},
			{
				text: '风险地区',
				value: 'Riskname',
			},
			{
				text: '出发地',
				value: 'depart',
			},
			{
				text: '到达地',
				value: 'arrive',
			},
			{
				text: '出发时间',
				value: 'departTime',
			},
			{
				text: '到达时间',
				value: 'arriveTime',
			},
			{
				text: '途径地',
				value: 'ByWayCity',
				sortable: false,
			},
		],
		train: [

		],
		HeadersAirline: [
			{
				text: '航班号',
				align: 'start',
				sortable: true,
				value: 'id',
			},
			{
				text: '风险地区',
				value: 'Riskname',
			},
			{
				text: '出发地',
				value: 'depart',
			},
			{
				text: '到达地',
				value: 'arrive',
			},
			{
				text: '出发时间',
				value: 'departTime',
			},
			{
				text: '到达时间',
				value: 'arriveTime',
			},
			{
				text: '状态',
				value: 'Status',
			},
		],
		airline:[

		]
	}),
	methods: {
		resizeTheChart() {
			if (this.$refs && this.$refs.mapbox) {
				let mychartNode = document.getElementById('mychart');
				mychartNode.style.height = mychartNode.offsetWidth*0.8+'px'
				this.mychart.resize();
			}
		},
	},
	created() {

	},
	mounted() {


		console.log(document.getElementById('map'));
		let map = new window.minemap.Map({
			container: 'map',
			style: 'https://mineservice.minedata.cn/service/solu/style/id/12624', /*底图样式*/
			center: [105.46,39.92], /*地图中心点*/
			zoom: 3, /*地图默认缩放等级*/
			pitch: 0, /*地图俯仰角度*/
			maxZoom: 18, /*地图最大缩放等级*/
			minZoom: 1,  /*地图最小缩放等级*/
			projection: 'MERCATOR'
		});
		console.log(map);

	},
};
</script>

<style>
#chinachart{
	width: 100%; height: 80vh;
	background: transparent;
}
</style>
